<template>
  <div id="AsnDetail">
    <div class="detail">
      <v-navMenu :detailNav="detailNav"
                 :menuData="menuData"
                 @setMentActive="setMentActive"></v-navMenu>
      <component :inputData="detailData"
                 :is="currentComponent"></component>
    </div>
  </div>

</template>

<script>
import detail from "commons/Detail";
import navMenu from "commons/NavMenu";
import baseMixin from "@/mixins/BaseMixin";
import config from "./Config";

export default {
  name: "Detail",
  mixins: [baseMixin, config],
  data () {
    return {
      flag: true,
      newFlag: false,
      selectData: {},
      detailData: {},
      detailNav: "1",
      componentConfig: [
        {
          name: "asnDetails",
          label: this.$t('work.filterfield'),
          component: () => import('./page/LjkwDetails.vue')
        },
      ]
    }
  },
  computed: {
    currentComponent () {
      return this.componentConfig[this.detailNav - 1].component;
    }
  },
  methods: {
    setMentActive (key) {
      this.detailNav = key;
    },

  },
  mounted () {
    let newFlag = this.$store.state.newFlag;

  },
  components: {
    "v-detail": detail,
    "v-navMenu": navMenu,
  },

}
</script>

<style scoped>
</style>
